package cn.wolfcode.trip.app.controller;

import cn.wolfcode.trip.base.service.INewsPageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/newsContent")
public class NewsContentController {
    @Autowired
    private INewsPageService newsPageService;


    /**
     * 查指定id日报文章
     * 资源:/newsPage/{id}
     * 动作:GET
     * 参数:state=1
     */
    @GetMapping("/{id}")
    public Object getNewsContent(@PathVariable Long id){
        return newsPageService.selectContent(id);
    }
}
